import Vue from 'vue'
import App from './App.vue'
//引入vuex
import store from '@/store'
//引入vue路由
import router from '@/router'
// 引入公共组件
import NavType from '@comp/NavType'
import Swiper from '@comp/Swiper'
import Pagenation from '@comp/Pagenation'

//引入mock数据
import '@/mock/mockServer'


Vue.config.productionTip = false
Vue.component('NavType', NavType)
Vue.component('Swiper', Swiper)
Vue.component('Pagenation', Pagenation)
new Vue({
  render: h => h(App),
  //把router路由对象注册到实例上，那么所有的组件实例上都有有一个$router和$route对象
  router,
  store,
  //因为父子生命周期问题，所以$bus不能写在mounted里面
  created(){
    Vue.prototype.$bus = this
  }
}).$mount('#app')



//测试请求
// import {getHomeListRequest} from '@/api'
// getHomeListRequest()
